# -*- codeing = utf-8 -*-
# @Time : 2021/2/22 18:30
# @Atuthor: 朱朱
# @File: 048求列表中的最大值.py
# @Software: PyCharm
nums = [6, 5, 3, 1, 8, 7, 2, 4]
max = nums[0]
index = 0
i = 0
while i < len(nums):
    if nums[i]>max:
        max=nums[i]
        index = i
    i+=1
print(max,index)